module.exports = (req, res, next) => {
  if (req.method === 'POST' && req.path === '/login') {
    if (req.body.userName === 'jack' && req.body.passWord === '123456') {
      return res.status(200).json({
        user: {
          token: '123'
        }
      })
    } else {
      return res.status(200).json({
        message: `用户名或者密码错误&&${req.body.userName}`
      })
    }
  }

  next()
}
